package main

import (
	"runtime"
	"os"
	"fmt"
	"../trans"
	"../scope"
	"../func_calls_func"
	"../operator"
)

var v int = 5

type Color int

type T struct {
}

func init() {
	fmt.Println("-init---------")

	trans.Load()
	scope.Load()
	func_calls_func.Load()
	operator.Load()
}

func main() {
	fmt.Println("-main---------")
	//Func0()
	//Func1()
	//Func2()
	//Func3()
	//Func4()
}

func (t T) Method1() {
	fmt.Println("-Method1---------")
}

func Func4() {
	fmt.Println("-Func4---------")
	sum, sub := trans.Calc(1, 2)
	fmt.Println(sum, sub)
}

func Func3() {
	fmt.Println("-Func3---------")
	var i int = 7
	var i2 = i
	fmt.Printf("address: %v %v\n", &i, &i2)
}

func Func2() {
	fmt.Println("-Func2---------")
	fmt.Println(runtime.GOOS)
	fmt.Println(os.Getenv("PATH"))
}

func Func1() {
	fmt.Println("-Func1---------")
	const (
		a = iota
		b = iota
		c = iota
	)

	const (
		RED   Color = iota
		GREEN       = iota
	)
	fmt.Println(a, b, c)
	fmt.Println(RED, GREEN)
}

func Func0() {
	var a int
	fmt.Println(a)
}
